package cn.itcast.bos.task;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import cn.itcast.bos.service.take_delivery.PromotionService;

@Component
public class PromotionTask {
	@Autowired
	private PromotionService promotionService;
	@Scheduled(cron="0 * * * * ?")
	public void updateStatus(){
		System.out.println("每秒执行一次");
		promotionService.updateStatus(new Date());
	}
}
